﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="原材料复检判定单.aspx.cs" Inherits="syc.ZhiJian.原材料复检判定单" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Configuration" %>
<html>
<head>
<title></title>
<style>
a.listitem{display:block;border-top:1px solid #eeeeee;padding:2px;}
a.listitem:link {color: #333333;text-decoration: none; }
a.listitem:visited {color: #333333;text-decoration: none; }
a.listitem:hover {color: #ff9966;text-decoration: none; background-color:#d2e8ae; }
a.listitem:active {color: #ff9966;text-decoration: none; }

a.edit{display:block;height:23px;line-height:23px;}
a.edit:link {color: #333333;text-decoration: none; }
a.edit:visited {color: #333333;text-decoration: none; }
a.edit:hover {color: #6666ff;text-decoration: none; background-color:#d2e8ae; }
a.edit:active {color: #6666ff;text-decoration: none; background-color:#d2e8ae; }

</style>
</head>
<body>
<script runat="server">
    protected string 车号;
    protected string 品名ID;
    protected string 品名;
    protected string 钢级;
    protected string 规格;
    protected string 重量;
    protected string 支数;
    protected string 供货商;

    protected int 判定状态;
    protected string 判定="合格";
    protected string 判定日期;
    protected string 交货状态;
    protected string 判定员;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {           
            车号=Request.QueryString["ch"];         
            品名ID = Request.QueryString["pm"];
            重量 = Request.QueryString["bl"];
            支数 = Request.QueryString["zs"];
            供货商 = Request.QueryString["ghs"];
            判定状态 = int.Parse(Request.QueryString["pd"]);
            判定日期 = Request.QueryString["rq"];
            判定员 = Request.QueryString["pdy"];
            if (判定状态 == 2)
            {              
                判定 = "合格";
            }
            else
            {
                判定 = "";
            }
            if (判定日期 ==""||判定日期 ==null)
            {
                判定日期 = "";
            }
            else
            {
                判定日期 = DateTime.Parse(判定日期).ToString("yyyy年MM月dd日");
            }
            if (品名ID == "1")
            {
                钢级 = "J55";
                规格="73.02*5.51";
                品名 = "油管光管";
                交货状态 = "正火";
            }
             if (品名ID =="2")
            {
                钢级 = "J55";
                规格="139.7*7.72";
                品名 = "套管光管";
                交货状态 = "正火";
            }
            if (品名ID == "3")
            {
                钢级 = "J55";
                规格="88.9*12.5";
                品名 = "油管接箍料";
                交货状态 = "正火";
            }
            if (品名ID == "4")
            {
                钢级 = "J55";
                规格 = "153.67*13";
                品名 = "套管接箍料";
                交货状态 = "正火";
            }
            if (品名ID == "5")
            {
                钢级 = "J55";
                规格 = "88.9*12.5";
                品名 = "成品油管接箍";
                交货状态 = "正火";
            }
            if (品名ID == "6")
            {
                钢级 = "J55";
                规格 = "153.67*13";
                品名 = "成品套管接箍";
                交货状态 = "正火";
            }

              if (品名ID == "101")
              {
                  钢级 = "N80";
                  规格 = "73.02*5.51";
                  品名 = "油管光管";
                  交货状态 = "调质态";
              }
              if (品名ID == "102")
              {
                  钢级 = "N80";
                  规格 = "139.7*7.72";
                  品名 = "套管光管";
                  交货状态 = "调质态";
              }
              if (品名ID == "103")
              {
                  钢级 = "N80";
                  规格 = "88.9*12.5";
                  品名 = "油管接箍料";
                  交货状态 = "调质态";
              }
              if (品名ID == "104")
              {
                  钢级 = "N80";
                  规格 = "153.67*13";
                  品名 = "套管接箍料";
                  交货状态 = "调质态";
              }
              if (品名ID == "105")
              {
                  钢级 = "N80";
                  规格 = "88.9*12.5";
                  品名 = "成品油管接箍";
                  交货状态 = "正火";
              }
              if (品名ID == "106")
              {
                  钢级 = "N80";
                  规格 = "153.67*13";
                  品名 = "成品套管接箍";
                  交货状态 = "正火";
              }

              if (判定 == "合格")
              {
                  PDZ.Visible = true;
              }
              else
              {
                  PDZ.Visible = false;
              }
             
        }
            

    }



</script>
<script type="text/javascript" language="javascript" src="/common.js"></script>
<form id="form1" runat="server" onsubmit="return(checkInput())">

<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
    SelectCommand="SELECT [ID], [名称] FROM [原料供货单位]" 
   >
    
</asp:SqlDataSource>
<div id="GHList" style="display:none; position:absolute;top:207px;left:160px; border:3px solid #ffcc00;width:120px; height:239px; overflow-y:scroll;background-color:#ffffff;">
<a class=listitem href="javascript:" onclick="setGH(-1,'');">---清空---</a>
<asp:Repeater ID="GongHuo" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<a id='ghid_<%# Eval("ID")%>' class=listitem href="javascript:" onclick='setGH(this.id,this.innerHTML);'><%# Eval("名称")%></a>
</ItemTemplate>
</asp:Repeater>
</div>

<div id="wintop" class="wintop">原材料复验判定单</div>
<asp:Panel ID="Panel1" runat="server" CssClass="panel">

    <asp:Button ID="Button_PanDin" runat="server" Text="盖 章" CssClass="button" 
        UseSubmitBehavior="False" Visible="false"  />

    <input type="button" value="导出Excel" class="button" onclick="Export();" style="font-weight:normal" />

    <input type="button" value="关 闭" class="button" onclick="parent.swin2_close();" />
    

</asp:Panel>

<script>    putBillHead();</script>

<asp:Panel ID="Panel3" runat="server">
<style>
td{text-align:center;}
td.pane{border:.5pt solid #000000;}
div.edit{overflow:hidden; white-space:nowrap;}
</style>
<table border=0 cellpadding=0 style=border-collapse:collapse;text-align:center;font-size:11pt;>
  <tr height=28>
    <td colspan=8 style=font-size:24px;font-weight:bold;> 原材料复验判定单</td>
  </tr>
  <tr height=24>
    <td colspan=8 style=padding-right:10px;text-align:right;>记录编号：SYC/ZJ-JZ-20</td>
  </tr>
  <tr height=24>
    <td colspan=4 style=padding-right:10px;text-align:left;>供货厂家:<%=供货商%></td>
    <td colspan=4 style=padding-right:10px;text-align:right;><%=判定日期 %></td>
  </tr>
   <tr height=28>
    <td width=80 class=pane>合同编号</td>
    <td width=70 class=pane>－</td>
    <td class=pane style="width: 73px" >产品名称</td>
    <td class=pane colspan="2"><%=品名%></td>
    <td class=pane style="width: 73px" >执行标准</td>
    <td  class=pane colspan="2" >API Spec  5CT</td>
  </tr>
  <tr height=28>
    <td width=80 class=pane>钢&nbsp; 级</td>
    <td width=70 class=pane><%=钢级 %></td>
    <td class=pane style="width: 73px" >规 格</td>
    <td class=pane colspan="2"><%=规格 %></td>
   <td class=pane style="width: 73px" >交货状态</td>
    <td  class=pane colspan="2"><%=交货状态%></td>
  </tr>
  <tr height=28>
    <td class=pane>炉 号</td>
    <td class=pane> －</td>
    <td class=pane style="width: 73px" >车 号</td>  
    <td class=pane style="width: 89px"><%=车号 %></td>   
    <td class=pane style="width: 65px">重量(t)</td>
    <td class=pane style="width: 73px"><%=重量%></td>
    <td class=pane style="width: 73px">支 数</td>
    <td width="100" class=pane><%=支数%></td>
  </tr>  
  <tr height=28>
    <td class=pane colspan="2">抗拉强度Rm  MPa</td>
    <td class=pane colspan="2">屈服强度Ys  MPa</td>
    <td class=pane colspan="2">伸长率&  %</td>
    <td class=pane colspan="2">化学成分</td> 
  </tr>
   <tr height=28>
    <td class=pane colspan="2"><%=判定 %></td>
    <td class=pane colspan="2"><%=判定 %></td>
    <td class=pane colspan="2"><%=判定 %></td>
    <td class=pane colspan="2"><%=判定 %></td> 
  </tr>
   <tr height=28>
    <td class=pane colspan="2">尺寸检查</td>
    <td class=pane colspan="2">外观检查</td>
    <td class=pane colspan="2">通径检验</td>
    <td class=pane colspan="2">无损探伤</td> 
  </tr>
   <tr height=28>
    <td class=pane colspan="2"><%=判定 %></td>
    <td class=pane colspan="2"><%=判定 %></td>
    <td class=pane colspan="2"><%=判定 %></td>
    <td class=pane colspan="2"><%=判定 %></td> 
  </tr>
  <tr height=60>
    <td class=pane>综合判定</td> 
      
      <td class=pane colspan="7" align="left"><div contentEditable ><%=判定 %></div></td>
  </tr>
   <tr height=24>   
    <td colspan=8 style=padding-right:10px;text-align:right;> 判定员：<%=判定员%></td>  
  </tr>
   <tr height=24>
    <td colspan=8 style=padding-right:10px;text-align:left;>注：一式4份：生产安环处、技术质量处、销售处、物料中心各一份。</td>
   </tr>
</table>
</asp:Panel>
<div style="text-align:right;height:105px;margin-top:-95px;margin-right:20px;">
<asp:Image ID="PDZ" runat="server" ImageUrl="/images/pdz.png" Visible="false" />
</div>
<script>    putBillFoot();</script>

</form>

<form id="form2" method="post" action="/PageExport.ashx">
<input type="hidden" name="filename" value="原材料复验判定单.xls" />
<input type="hidden" name="content" value="" />
</form>


<script>
var notice = '<%=this.Notice %>';
if (notice != '') {
    parent.showmsgbox(notice);
}

//导出Excel
function Export() {
    form2.content.value =
"<html xmlns:o='urn:schemas-microsoft-com:office:office'\nxmlns:x='urn:schemas-microsoft-com:office:excel'\nxmlns='http://www.w3.org/TR/REC-html40'>\n<head>\n<meta http-equiv=Content-Type content='text/html; charset=utf-8'>\n<style>\n<!--table\n@page\n{mso-header-data:;\nmso-footer-data:;\nmargin:.79in .31in .79in .31in;\nmso-header-margin:.51in;\nmso-footer-margin:.51in;\nmso-page-orientation:landscape;\nmso-horizontal-page-align:center;\n}\n-->\n</style>\n<!--[if gte mso 9]><xml>\n<x:ExcelWorkbook>\n<x:ExcelWorksheets>\n<x:ExcelWorksheet>\n<x:Name>生产进度日报表</x:Name>\n<x:WorksheetOptions>\n<x:DefaultRowHeight>285</x:DefaultRowHeight>\n<x:Print>\n<x:ValidPrinterInfo/>\n<x:Scale>100</x:Scale>\n<x:PaperSizeIndex>9</x:PaperSizeIndex>\n<x:HorizontalResolution>200</x:HorizontalResolution>\n<x:VerticalResolution>200</x:VerticalResolution>\n</x:Print>\n<x:Selected/>\n<x:Panes>\n<x:Pane>\n<x:Number>3</x:Number>\n<x:ActiveRow>0</x:ActiveRow>\n<x:ActiveCol>0</x:ActiveCol>\n</x:Pane>\n</x:Panes>\n</x:WorksheetOptions>\n</x:ExcelWorksheet>\n</x:ExcelWorkbook>\n</xml><![endif]-->\n</head>\n<body>"
            + document.getElementById("Panel3").innerHTML.replace(/<a [^>]*>/gi, "").replace(/<\/a>/gi, "");
            + "</body></html>";
    form2.submit();
}
</script>

</body>
</html>
